@font-face {
            font-family: "BengaliMeitei";
            src: url("fonts/BengaliMeitei.woff2") format("woff2") tech('variations'),
                 url("fonts/BengaliMeitei.woff") format("woff"),
                 url("fonts/BengaliMeitei.ttf") format("truetype");
            font-weight: 400;
            font-style: normal;
            font-display: fallback;
        }
        @font-face {
            font-family: "MeiteiMayek";
            src: url("fonts/MeiteiMayek.woff2") format("woff2") tech('variations'),
                 url("fonts/MeiteiMayek.woff") format("woff"),
                 url("fonts/MeiteiMayek.ttf") format("truetype");
            font-weight: 400;
            font-style: normal;
            font-display: fallback;
        }
        body { 
            font-family: Arial, sans-serif;
           background:rgb(249, 229, 217);
            margin: 0;
            padding: 10px;
        }
        .container { margin: 5px; }
        .row { 
            display: flex; 
            margin-bottom: 5px; 
            padding: 5px; 
            border: 1px solid #ccc; 
        }
        .cell { 
            padding: 5px; 
            border: 1px solid #000; 
            min-width: 100px;
            pointer-events: none;
            user-select: none;
        }
        .input-section { 
            margin-bottom: 5px; 
            padding: 5px;
        }
        .hidden {
            display: none !important;
        }
        .popup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            justify-content: center;
            align-items: center;
        }
        .popup-content {
            background: white;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }
        .popup-content button {
            margin-top: 10px;
            padding: 8px 15px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
        .popup-content button:hover {
            background-color: #0056b3;
        }
        .language-btn {
            pointer-events: none;
            opacity: 0.5;
        }
        .language-btn.active {
            pointer-events: auto;
            opacity: 1;
        }
        
        /* Left Panel Styles */
        #left-panel {
            display: none;  /* Hide by default on large screens */
            position: fixed;
            left: 0;
            top: 0;
            height: 100%;
            width: 200px;
            background: linear-gradient(180deg,#ce5611, #da9021, #a03a00);
            padding: 10px;
            box-shadow: 2px 0 5px rgba(0,0,0,0.2);
            z-index: 1000;
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(5px);
            transform: translateX(-100%);
            will-change: transform;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
            contain: layout style paint;
        }

        #left-panel.active {
            transform: translateX(0);
        }

        body.panel-active {
            margin-left: 0 !important;
            transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        #left-panel h3 {
            color: white;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
            margin-bottom: 15px;
            font-size: 22px;
            text-align: center;
        }

        #left-panel .navbar {
            flex-direction: column;
            align-items: flex-start;
            gap: 0;
            list-style: none;
            padding: 0;
            margin: 0;
        }

        #left-panel .navbar li {
            width: 100%;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        #left-panel .navbar a {
            display: block;
            padding: 12px 15px;
            color: white;
            text-decoration: none;
            transition: all 0.3s ease;
            width: 100%;
            box-sizing: border-box;
        }

        #left-panel .navbar a:hover {
            background: rgba(255, 255, 255, 0.1);
            padding-left: 20px;
        }

        #menu-toggle {
            display: none;
            position: fixed;
            left: 10px;
            top: 8px;
            z-index: 1001;
            background: #883f15c2;
            color: white;
            border: none;
            padding: 5px 10px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
        }

        .progress-bar-container {
            display: none;
            margin-top: 10px;
            width: 100%;
            background-color: #f3f3f3;
            border: 1px solid #ccc;
            border-radius: 5px;
            overflow: hidden;
            position: relative;
        }
        .progress-bar {
            height: 15px;
            width: 0%;
            background: linear-gradient(90deg, #007bff, #00c6ff);
            position: relative;
            transition: width 0.4s ease;
            overflow: hidden;
        }
        .progress-bar .bubble {
            position: absolute;
            bottom: 0;
            width: 10px;
            height: 10px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 50%;
            animation: bubble 3s infinite ease-in-out;
            opacity: 0.8;
        }
        .progress-bar-percentage {
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            font-size: 14px;
            font-weight: bold;
            color: #000;
        }
        @keyframes flame {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(1.2);
                opacity: 0.8;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }
        @keyframes bubble {
            0% {
                transform: translateY(0) scale(1);
                opacity: 0.8;
            }
            50% {
                transform: translateY(-15px) scale(1.2);
                opacity: 0.6;
            }
            100% {
                transform: translateY(-30px) scale(1);
                opacity: 0;
            }
        }
        .navbar a {
            padding: 5px 10px; /* Reduce padding to make the buttons smaller */
            font-size: 12px; /* Keep the font size unchanged */
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: 8px; /* Update border radius to 8px */
            text-decoration: none;
            color: white;
            font-weight: bold;
            transition: all 0.3s ease;
        }
        .navbar a:hover {
            background-color: rgba(255, 255, 255, 0.144);
            font-size: 14px;
            box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.3);
            transform: scale(1.05);
            transition: all 0.3s ease;
        }
        @media screen and (max-width: 768px) and (orientation: portrait) {
            .navbar {
                flex-wrap: wrap;
                gap: 5px;
            }

            .navbar a {
                font-size: 10px;
                padding: 3px 5px;
            }
        }
        @media screen and (max-width: 768px) {
            #menu-toggle {
                display: block;
                position: static;
                margin: 0;
                padding: 5px 10px;
                z-index: auto;
                background: transparent;
            }

            #top-panel {
                display: flex;
                height: 25px;
                padding: 5px 10px;
                align-items: center;
                gap: 5px; /* Add gap between elements */
            }

            #menu-toggle {
                margin-left: -5px; /* Move toggle slightly more left */
                background: transparent;
                padding: 0px;
                font-size: 18px;
            }

            #top-panel h3 {
                font-size: 18px;
                margin-left: 5px; /* Reduce margin */
                flex-grow: 1;
                text-align: center;
            }

            #top-panel .navbar {
                display: none !important;
            }

            #left-panel {
                display: block;  /* Show on small screens */
                transform: translateX(-100%);
                transition: transform 0.3s ease-out;
                will-change: transform;
                overscroll-behavior: contain;
                z-index: 1000; /* Ensure left panel is above logo and toggle */
            }

            #left-panel.active {
                display: block;
                width: 180px;
            }

            #left-panel .navbar a {
                padding: 12px 15px;
                font-size: 14px;
                margin: 4px 0;
                border-radius: 8px;
                background: rgba(255, 255, 255, 0.1);
                transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
                transform-origin: left;
                display: block;
                width: calc(100% - 10px);
                margin-left: 5px;
                position: relative;
                overflow: hidden;
            }

            #left-panel .navbar a:hover {
                background: rgba(255, 255, 255, 0.25);
                transform: translateX(5px) scale(1.05);
                box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
                font-weight: bold;
                color: #fff;
                text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
            }

            #left-panel .navbar a:active {
                transform: translateX(15px) scale(1.1);
                background: rgba(255, 255, 255, 0.35);
                box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4);
                transition: all 0.1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            }

            body {
                margin-left: 0;
                transition: margin-left 0.3s ease-out;
                overscroll-behavior-x: none;
            }

            body.panel-active {
                margin-left: 200px;
            }

            body {
                padding: 5px;
                margin: 0;
            }

            .navbar a {
                display: none; /* Completely hide the buttons */
            }

            .input-section {
                margin-bottom: 5px;
            }

            .row {
                margin-bottom: 3px;
                padding: 1px;
            }

            .cell {
                padding: 3px;
                min-width: 80px;
            }

            .popup-content {
                width: 90%;
                max-width: 300px;
                margin: 10px;
                padding: 15px;
                font-size: 14px;
            }

            .popup-content button {
                padding: 6px 12px;
                font-size: 14px;
                margin-top: 8px;
                width: 80%;
                max-width: 200px;
            }

            #popup {
                padding: 0 10px;
            }

            body {
                margin-left: 0;
            }
        }

        /* Kuthi Panel Styles */
        #kuthi-panel-1 {
            position: relative;
            width: 8.5in;
            aspect-ratio: 8.5 / 13.6;/* aspect-ratio: 8.5 / 13.6;*/
            max-width: 100%;
            background-color: #ffffff;
            box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            align-items: flex-start; /* Align to the left */
            justify-content: flex-start; /* Ensure it remains left-aligned */
            text-align: left; /* Align text to the left */
            padding: 0px;
            margin: 20px 0; /* Remove auto centering */
            padding-top: 25px;
            padding-left: 25px;
            padding-right: 25px;
            font-weight: 600;
            font:black 14px "BengaliMeitei", sans-serif;

        
        }
#kuthi-panel-1 {
    border-image-slice: 130 133 133 136;
    border-image-width: 25px 25px 25px 25px; /* Top, Right, Bottom, Left */
    border-image-outset: 0px;
    border-image-repeat: round;
    border-image-source: url('border4 - Copy.jpg');
    border-style: solid;
}


@media (max-width: 480px) {
  #kuthi-panel-1 {
    border-image-slice: 130 133 133 136;
    border-image-width: 10px;
    border-image-outset: 3px;
  }
}

        /* Table styling */
        #Tripap {
            width: 99%;
            height: 100%;
            border-collapse: collapse;
            text-align: start;
            font-size: 14px;
            padding-bottom: 9%;
        }

        #Tripap th, #Tripap td {
            border: 1px solid rgb(0, 0, 0);
            text-align: center;
            padding: 0px;
        }

        #Tripap th {
            height: 13%;
            background-color: #ffffff;
            font-weight: bold;
        }

        #Tripap td {
            height: 7%;
        }

        #Tripap tr:nth-child(1) td,
        #Tripap tr:nth-child(5) td,
        #Tripap tr:nth-child(6) td,
        #Tripap tr:nth-child(10) td {
            border-left: none;
            border-right: none;
            border-top: 1px solid black;
            border-bottom: 1px solid black;
        }

        #Janma-Table {
            width: 95%;
            height: 40%;
            border-collapse: collapse;
            font-size: 14px;
        }

        #Janma-Table td {
            height: 8%;
            border: none;
            text-align: center;
            padding: 0px;
        }

        #Janma-Table tr.tripapbarsh td,
        #Janma-Table tr.navatara td {
            height: 12%;
            border-bottom: 1px solid black !important;
            vertical-align: middle;
            padding-top: 0%;
            margin-top: 0%;
        }

        #Janma-Table tr:nth-child(3) td,
        #Janma-Table tr:nth-child(4) td,
        #Janma-Table tr:nth-child(5) td,
        #Janma-Table tr:nth-child(6) td {
            height: 8%;
            border: 1px solid black;
        }

        @media (max-width: 450px) {
            #kuthi-panel-1 {
                width: 100vw;
                height: calc(100vw * (14 / 8.5));
                padding: 5px;
            }
            #Tripap, #Janma-Table {
                font-size: 7px;
            }
        }

        /* Top Panel Styles */
        #top-panel {
            height: 45px;
            background: linear-gradient(180deg, #b54108, #b95436, #ca1e1e);
            background-size: 200% 200%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 2px 0 5px rgba(0,0,0,0.2);
            border-radius: 0;
            justify-content: space-between;
            padding: 10px;
            display: flex;
            align-items: center;
            margin-bottom: 20px;
        }
        
        #top-panel h3 {
            color: white;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
            margin: 0;
            font-size: 22px;
        }

        @media screen and (max-width: 768px) {
            #top-panel {
                display: flex;
                height: 25px;
                padding: 5px 10px;
                align-items: center;
                gap: 5px; /* Add gap between elements */
            }

            #menu-toggle {
                margin-left: -5px; /* Move toggle slightly more left */
                background: transparent;
                padding: 5px;
                font-size: 18px;
            }

            #top-panel h3 {
                font-size: 18px;
                margin-left: 5px; /* Reduce margin */
                flex-grow: 1;
                text-align: center;
            }

            #top-panel .navbar {
                display: none !important;
            }
        }
        #responsive-table {
    width: 100%;
    border-collapse: collapse;
  }

  #responsive-table td {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
  }

  @media (max-width: 600px) {
    #responsive-table td {
      font-size: 14px;
      padding: 10px;
    }
  }

  @media (max-width: 400px) {
    #responsive-table td {
      font-size: 13px;
      padding: 8px;
    }
  }
        /* Styling for the 'years-and-dasha' table with only bottom borders */
#years-and-dasha {
    width: 99%;
    height: 100%;
    border-collapse: collapse;
    text-align: start;
    font-size: 14px;
    padding-bottom: 9%;
}


#years-and-dasha th,
#years-and-dasha td {
    border: none; /* Remove all borders first */
    border-bottom: 1px solid rgb(107, 105, 105); /* Only bottom border */
    text-align: center;
    padding: 0.1vh;
}

#years-and-dasha th {
    height: 13%;
    background-color: #ffffff;
    font-weight: bold;
}

#years-and-dasha td {
    height: 10%;
}

/* Responsive screen adjustment for small devices */
@media (max-width: 450px) {
    #container-3 {
        width: 96vw;
        padding: 0px;
        
    }

    #years-and-dasha {
        font-size: 7px;
        
    }
}
#yearlist {
    width: fit-content;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 5px;
    padding-left: 20px;
    padding-right: 20px;
    font-size: 14px;
    text-align: justify;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    line-height: 1.6; /* line spacing */
    
}

/* Optional: simulate line-by-line bottom borders */
#yearlist span {
    display: block;
    border-bottom: 1px solid #cccccc00;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

/* Responsive adjustments */
@media (max-width: 450px) {
    #yearlist {
        font-size: 7px;
        padding: 5px;
        width: 95vw;
        line-height: 1.4;
        padding-top: 2px;
        padding-bottom: 0px;
    }

    #yearlist span {
        padding-bottom: 0px;
        margin-bottom: 1px;
    }
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


#container-2 {
  height: 300px; /* 1/5th of legal size height at 96dpi */
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 0px solid #ccc;
  border-top: 4px double black;
  font-size: 14px;
  padding-top: 2px;
}


#top-row {
  display: flex;
  flex-direction: row;
  height: 95%;
  width: 100%;
}

#sput-container {
  width: 21%;
}

#Rashi-container {
  width: 46%;
}

#nabangsha-container {
  width: 25%;
}

#janam-container {
  width: 8%;
}

/* Give each block full height to match 92% */
#sput-container,
#Rashi-container,
#nabangsha-container,
#janam-container {
  height: 100%;
  border: 0px solid #ddd;
  overflow: auto;
  padding: 0.1vw;
}

#sput-container {
  font-weight: 700;
  letter-spacing: -0.06vw;
 line-height: 1.6;
  font-size: clamp(0.001rem, 1.5vw + 0.02rem, 13px);
}
/* Small screen adjustment */
@media (max-width: 600px) {
  #sput-container {
   
    line-height: 1.4;
    padding-left: 1px;
  }
}

#bakari-table {
  width: 100%;
  height: 5%;
  border-collapse: collapse;
  font-size: inherit;
}
#janam-container {
  line-height: 1.4;
  font-size: clamp(0.01rem, 1.2vw + 0.01rem, 0.61rem);
  /*font-weight: bold;*/
}

/* Small screen adjustment */
@media (max-width: 600px) {
  #janam-container {
    
    line-height: 0.61vh;
    
  }
}

#bakari-table td {
  border-bottom: 0px solid black;
  text-align: center;
  padding: 0;
  height: 100%;
}

/* Responsive font sizing */
@media (max-width: 600px) {
  #container-2 {
      height: 150px;
    font-size: 7px;
    border-top: double 2px black;
    padding-bottom: 3px;
  }
}
#Rashi-container{
    background-image: url('WhatsApp Image 2025-04-15 at 12.26.33_a34b2bc2.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  
    display: grid;
    grid-template-columns: 18% 25% 18% 23% 16%;
    grid-template-rows: 18% 23% 18% 23% 18%;
    gap: 0;
    width: 40%; /* Rashi */
    max-width: 40%; /* Updated max-width */
    height: 100%;
    box-sizing: border-box;
    
    overflow: hidden;
    padding: 0;
}

#rashi-item-7.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
.half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
.left-halfdown7 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.right-halfup7 {
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
.text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned */
.left-halfdown7 .text-wrapper {
  left: 0;
  align-items: flex-start;
  justify-content: center;
  text-align: right;
  
}

/* Right - top aligned */
.right-halfup7 .text-wrapper {
  right: 0;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: right;
  
}

/* Text styling */
.left-halfdown7 .text {
    margin-top: 90%;
    margin-left: 60%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700;
}

.right-halfup7 .text {
margin-top: 30%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  margin-right: 15%;
  font-weight: 700;
}





#rashi-item-19.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
.half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
.left-halfdown19 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.right-halfup19 {  /* Updated class name */
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
.right-halfup19 .text-wrapper {  /* Corrected class selector */
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned, text align left */
.left-halfdown19 .text-wrapper {
  left: 0;
  align-items: flex-start;       /* Align wrapper content to the left */
  justify-content: flex-start;
  text-align: left;
}

/* Right - top aligned, text align right but centered inside wrapper */
.right-halfup19 .text-wrapper {
  left: 25%;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: right;             /* Make text aligned to the right */
}

/* Text styling */
.left-halfdown19 .text {
  margin-top: 70%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 75%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700;
}

.right-halfup19 .text {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 25%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700;
  text-align: right;              /* Ensures right-aligned text */

}


#rashi-item-17 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#rashi-item-17 .half {
  
  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.left-halfdown17 {
  background-color: #ffffff00;
  clip-path: polygon(0 0, 100% 0, 0 100%); /* Top-left triangle */
}

.right-halfup17 {
  background-color: #ffffff00;
  clip-path: polygon(100% 0, 100% 100%, 0 100%); /* Bottom-right triangle */
}

#rashi-item-17 .text-wrapper {
   

  color: #000;  /* Corrected property name from fontcolor to color */
  position: absolute;
  width: 35%;
  height: 100%;
  display: flex;
  flex-direction: column;
 
  
  line-height: 0.9;
}

#rashi-item-17 .left-halfdown17 .text-wrapper {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 27%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700; 
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#rashi-item-17 .right-halfup17 .text-wrapper {
  margin-top: 60%;
  margin-right: 5%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700; 
  right: 0;
  align-items: flex-end;
  text-align: right;
}

#rashi-item-17 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}






#rashi-item-9 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

}

#rashi-item-9 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: rgb(0, 0, 0);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-halfdown9 {
  background-color: #3498db00;
  clip-path: polygon(0 0, 100% 0, 0 100%); /* Top-left triangle */
}

.right-halfup9 {
  background-color: #e74d3c00;
  clip-path: polygon(100% 0, 100% 100%, 0 100%); /* Bottom-right triangle */
}

#rashi-item-9 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  
  line-height: 0.9;
}

#rashi-item-9 .left-halfdown9 .text-wrapper {
  margin-top: 23%;
  margin-right: 0%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700; 
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#rashi-item-9 .right-halfup9 .text-wrapper {
  margin-top: 100%;
  margin-right: 15%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 50%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: 700; 
  right: 0;
  align-items: flex-start;
  text-align:center;
  text-justify: flex-end;
}

#rashi-item-9 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}

#rashi-item-8,
#rashi-item-12,
#rashi-item-14,
#rashi-item-18 {
  font-weight: 700;
  font-size: 0.65rem;
}


@media only screen and (max-width: 600px) {

/* === Rashi Item 7 === */
.left-halfdown7 .text {
  font-size: 0.3rem;
  line-height: 0.9;
  max-width: 95%;
  margin-top: 93%;
  margin-left: 50%;
}

.right-halfup7 .text {
  font-size: 0.3rem;
  line-height: 0.9;
  max-width: 80%;
  margin-top: 35%;
  margin-right: 20%;
  margin-left: 0%;
}

/* === Rashi Item 9 === */
#rashi-item-9 .left-halfdown9 .text-wrapper {
  font-size: 0.3rem;
  line-height: 0.8;
  max-width: 50%;
  margin-top: 27%;
  margin-left: 0%;
  margin-right: 5%;
}

#rashi-item-9 .right-halfup9 .text-wrapper {
  font-size: 0.3rem;
  line-height: 0.8;
  max-width: 40%;
  margin-top: 97%;
  margin-left: 22%;
  margin-right: 22%;
}

/* === Rashi Item 17 === */
#rashi-item-17 .left-halfdown17 .text-wrapper {
  font-size: 0.3rem;
  line-height: 0.8;
  width: 50%;
  max-width: 60%;
  margin-top: 15%;
  margin-left: 23%;
  margin-right: 0%;
 

}

#rashi-item-17 .right-halfup17 .text-wrapper {
  font-size: 0.3rem;
  line-height: 0.8;
  width: 30%;
  max-width: 30%;
  margin-top: 60%;
  margin-left: 0%;
  margin-right: 7%;
}

/* === Rashi Item 19 === */
.left-halfdown19 .text {
  font-size: 0.3rem;
  line-height: 0.9;
  width: 90%;
  max-width: 100%;
  margin-top: 90%;
  margin-left: 0%;
  margin-right: 0%;
}

.right-halfup19 .text {
  font-size: 0.3rem;
  line-height: 0.9;
  width: 100%;
  max-width: 100%;
  margin-top: 15%;
  margin-left: 15%;
  margin-right: 0%;
}

}

@media (max-width: 600px) {
  #rashi-item-13 {
    font-size: 6px !important;
    line-height: 1 !important;
    padding: 0 !important;
    word-break: break-word;
    max-width: 95%;
    text-align: center;
  }
}

@media (max-width: 600px) {
  #rashi-item-8,
  #rashi-item-12,
  #rashi-item-14,
  #rashi-item-18 {
    font-weight: 700 !important;
    font-size: 0.3rem !important;
    text-align: center;
  }
}

#nabangsha-container {
    background-image: url('a1Astrology Layout_page-0001(2).jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: 2%;

  display: grid;
  grid-template-columns: 7% 34% 18% 34% 7%;
  grid-template-rows: 12% 29% 18% 29% 12%;
  gap: 0;
  width: 25%; /* Rashi */
  max-width: 25%;
  height: 100%;
  box-sizing: border-box;
  border: 0px solid #ddd;
  overflow: hidden;
  padding: 0;
}




/* Nabangsha Item 7 */
#nabangsha-item-7.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
#nabangsha-item-7 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
#nabangsha-item-7 .left-halfdown-n7 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

#nabangsha-item-7 .right-halfup-n7 {
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
#nabangsha-item-7 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned */
#nabangsha-item-7 .left-halfdown-n7 .text-wrapper {
  left: 0;
  align-items: flex-start;
  justify-content: center;
  text-align: right;
}

/* Right - top aligned */
#nabangsha-item-7 .right-halfup-n7 .text-wrapper {
  right: 0;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: right;
}

/* Text styling */
#nabangsha-item-7 .left-halfdown-n7 .text {
  margin-top: 90%;
  margin-left: 60%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold;
}

#nabangsha-item-7 .right-halfup-n7 .text {
  margin-top: 30%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 80%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  margin-right: 15%;
  font-weight: bold;
}

/* Nabangsha Item 9 */
#nabangsha-item-9 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#nabangsha-item-9 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: rgb(0, 0, 0);
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#nabangsha-item-9 .left-halfup-n9 {
  background-color: #3498db00;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

#nabangsha-item-9 .right-halfdown-n9 {
  background-color: #e74d3c00;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

#nabangsha-item-9 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  line-height: 0.9;
}

#nabangsha-item-9 .left-halfup-n9 .text-wrapper {
  margin-top: 23%;
  margin-right: 0%;
  margin-left: 10%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold; 
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#nabangsha-item-9 .right-halfdown-n9 .text-wrapper {
  margin-top: 90%;
  margin-right: 10%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 35%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold; 
  right: 0;
  align-items: flex-start;
  text-align:center;
  text-justify: flex-end;
}

#nabangsha-item-9 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}

/* Nabangsha Item 17 */
#nabangsha-item-17 {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  
}

#nabangsha-item-17 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#nabangsha-item-17 .left-halfup-n17 {
 
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

#nabangsha-item-17 .right-halfdown-n17 {
  
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

#nabangsha-item-17 .text-wrapper {
  color: #000;
  position: absolute;
  width: 35%;
  height: 100%;
  display: flex;
  flex-direction: column;
  line-height: 0.9;
}

#nabangsha-item-17 .left-halfup-n17 .text-wrapper {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 27%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold; 
  left: 0;
  align-items: flex-start;
  text-align: left;
}

#nabangsha-item-17 .right-halfdown-n17 .text-wrapper {
  margin-top: 60%;
  margin-right: 5%;
  margin-left: 0%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 40%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold; 
  right: 0;
  align-items: flex-end;
  text-align: right;
}

#nabangsha-item-17 .text {
  word-wrap: break-word;
  max-width: 90%;
  line-height: 0.9;
}

/* Nabangsha Item 19 */
#nabangsha-item-19.diagonal-box {
  position: relative;
  overflow: hidden;
}

/* Shared styles */
#nabangsha-item-19 .half {
  position: absolute;
  width: 100%;
  height: 100%;
  color: #000;
  display: flex;
}

/* Diagonal clipping */
#nabangsha-item-19 .left-halfdown-n19 {
  background: transparent;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

#nabangsha-item-19 .right-halfup-n19 {
  background: transparent;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

/* Wrapper containers */
#nabangsha-item-19 .right-halfup-n19 .text-wrapper {
  position: absolute;
  width: 40%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Left - bottom aligned, text align left */
#nabangsha-item-19 .left-halfdown-n19 .text-wrapper {
  left: 0;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
}

/* Right - top aligned, text align right but centered inside wrapper */
#nabangsha-item-19 .right-halfup-n19 .text-wrapper {
  left: 25%;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: right;
}

/* Text styling */
#nabangsha-item-19 .left-halfdown-n19 .text {
  margin-top: 75%;
  margin-left: 20%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 75%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold;
}

#nabangsha-item-19 .right-halfup-n19 .text {
  margin-top: 10%;
  margin-right: 0%;
  margin-left: 35%;
  font-size: 0.6rem;
  line-height: 0.9;
  max-width: 100%;
  word-wrap: break-word;
  white-space: normal;
  overflow-wrap: break-word;
  font-weight: bold;
  text-align: right;
}

#nabangsha-item-8,
#nabangsha-item-12,
#nabangsha-item-14,
#nabangsha-item-18 {
  font-weight: bold;
  font-size: 0.65rem;
  text-align: center;
}


/* Mobile Responsive Styles */
@media only screen and (max-width: 600px) {
  /* Nabangsha Item 7 */
  #nabangsha-item-7 .left-halfdown-n7 .text {
    font-size: 0.3rem;
    line-height: 0.9;
    max-width: 95%;
    margin-top: 93%;
    margin-left: 50%;
  }

  #nabangsha-item-7 .right-halfup-n7 .text {
    font-size:  0.3rem;
    line-height: 0.9;
    max-width: 80%;
    margin-top: 35%;
    margin-right: 20%;
    margin-left: 0%;
  }

  /* Nabangsha Item 9 */
  #nabangsha-item-9 .left-halfup-n9 .text-wrapper {
    font-size:  0.3rem;
    line-height: 0.8;
    max-width: 50%;
    margin-top: 27%;
    margin-left: 10%;
    margin-right: 0%;
  }

  #nabangsha-item-9 .right-halfdown-n9 .text-wrapper {
    font-size:  0.3rem;
    line-height: 1;
    max-width: 40%;
    margin-top: 97%;
    margin-left: 35%;
    margin-right: 5%;
  }

  /* Nabangsha Item 17 */
  #nabangsha-item-17 .left-halfup-n17 .text-wrapper {
    font-size:  0.3rem;
    line-height: 0.8;
    width: 50%;
    max-width: 60%;
    margin-top: 15%;
    margin-left: 23%;
    margin-right: 0%;
  }

  #nabangsha-item-17 .right-halfdown-n17 .text-wrapper {
    font-size:  0.3rem;
    line-height: 0.8;
    width: 30%;
    max-width: 30%;
    margin-top: 60%;
    margin-left: 0%;
    margin-right: 7%;
  }

  /* Nabangsha Item 19 */
  #nabangsha-item-19 .left-halfdown-n19 .text {
    font-size: 0.3rem;
    line-height: 1;  
    width: 90%;
    max-width: 100%;
    margin-top: 90%;
    margin-left: 10%;
    margin-right: 0%;
  }

  #nabangsha-item-19 .right-halfup-n19 .text {
    font-size:  0.3rem;
    line-height: 1.1;
    width: 100%;
    max-width: 100%;
    margin-top: 15%;
    margin-left: 15%;
    margin-right: 0%;
  }
}

@media (max-width: 600px) {
  #nabangsha-item-8,
  #nabangsha-item-12,
  #nabangsha-item-14,
  #nabangsha-item-18 {
    font-weight: bold !important;
    font-size: 0.3rem !important;
    text-align: center;
  }
}







#nabangsha-container {
  width: 32%; /* Nabangsha */
  max-width: 32%;
}

/* Individual grid items (optional styling) */
#Rashi-container > div
{
  border: 0px solid #aaa;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

#nabangsha-container > div {
  border: 0px solid #aaa;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

  /* Estimated 1/10 of legal height (~1120px) = ~112px */
  #sub-container-2 {
    height: 112px;
    width: 100%;
   
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  /* Flex row holding the left and right columns */
  #sub-container-2 .row {
    display: flex;
    flex: 1;
    width: 100%;
  }

  #inner-sub-a, #inner-sub-b {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    font-size: 0.9rem;
  }

/*   #inner-sub-a {
    border-right: 1px solid #ccc;
  }
 */
  /* Table at bottom */
  #sub-container-2 table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #000;
    font-size: 0.9rem;
  }

  #sub-container-2 td {
    text-align: center;
    padding: 0px;
  }

  /* Responsive design for small screens */
  @media (max-width: 600px) {
    #sub-container-2 {
      height: 100px; /* Slightly smaller for smaller screens */
    }

    #inner-sub-a, #inner-sub-b {
      font-size: 0.4rem;
    }

    #sub-container-2 table {
      font-size: 0.4rem;
    }
  }


  /* Simulate legal paper height (1/5 of A4 = ~225px) */
  #container-1 {
    height: 225px;
    width: 100%;
    
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .top-div {
    height: 25%;
    width: 100%;
    background-color: #ffffff00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    display: flex;
    flex-direction: column;

  }
  #Headingkuthi{
    width: 100%;
  height: 44%;
  font-size: 1.5rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold; /* Optional for emphasis */
  }
#Headingkuthi2 {
  width: 100%;
  height: 56%;
  font-size: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold; /* Optional for emphasis */
}

/* 📱 Responsive for small screens */
@media (max-width: 450px) {
  #Headingkuthi
    {
    font-size: 12px;
  }
}
  @media (max-width: 450px) {
  #Headingkuthi2 {
    font-size: 6px;
    
  }
}




  .bottom-divs {
    height: 75%;
    width: 100%;
    display: flex;
    flex-direction: row; /* Always row */
    flex-wrap: nowrap;
  }

  .bottom-divs > div {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
  }

  .left {
    width: 20%;
    background-color: #ffffff00;
  }

  .middle {
 
  width: 60%;
  background-color: #ffe0b200;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
  gap: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0;
  margin: 0;
}

.middle-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.9rem;
  box-sizing: border-box;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  
}

.box-1 {
  width: 33%;
  background-image: url('Janma.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;


}

.box-2 {
    background-image: url('2cross.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  width: 34%;
  background-color: rgba(221, 255, 221, 0);
  display: flex;
  flex-direction: column;
}

.box-3 {
  width: 33%;
  background-image: url('Janma.jpg');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

#jatahagrid {
  width: 100%;
  height: 90%;
  background-color: #f0f0f000;
  display: grid;
  grid-template-columns: 21% 20% 21% 19% 19%;
  grid-template-rows: 38% 7.5% 7.5% 7.5% 7.5% 7.5% 7.5% 7.5% 7%;
  gap: 0;
}

/* Default style for all grid items */
#jatahagrid > div {
  font-size: 0.8rem;
  display: flex;
  align-items: center; /* Vertically centers text */
  box-sizing: border-box;
  overflow: hidden;
 
}

/* Column 1 (Left-Aligned) */
#jatahagrid > div:nth-child(5n+1) { /* Targets 1st, 6th, 11th, ... items (Column 1) */
  justify-content: flex-start; /* Left-align */
  text-align: left;
 margin-left: 3px;
}

/* Columns 2, 3, 4 (Centered) */
#jatahagrid > div:nth-child(5n+2),
#jatahagrid > div:nth-child(5n+3),
#jatahagrid > div:nth-child(5n+4) {
  justify-content: center; /* Center-align */
  text-align: center;
}

/* Column 5 (Right-Aligned) */
#jatahagrid > div:nth-child(5n+5) { /* Targets 5th, 10th, 15th, ... items (Column 5) */
  justify-content: flex-end; /* Right-align */
  text-align: right;
  margin-right: 3px;
}
/* Responsive adjustments for small screens */
@media (max-width: 600px) {
  #jatahagrid > div {
    font-size: 0.3rem; /* Smaller font size for mobile */
    padding: 0px; /* Optional: add some breathing room */
  }

  #jatahagrid > div:nth-child(5n+1) {
    margin-left: 2px;
  }

  #jatahagrid > div:nth-child(5n+5) {
    margin-right: 2px;
  }
}

.bottom-label-jataha {
  width: 100%;
  height: 10%;
  background-color: #cccccc00; /* optional */
  align-items:center ;
 text-align: center;
 
  bottom: 0;
  left: 0;
}
#crossgrid {
  width: 100%;
  height: 100%;
  background-color: #f0f0f000;
  display: grid;
  grid-template-columns: 16% 5% 58% 3% 18%;
  grid-template-rows: 42% 8% 8% 8% 10.5% 10% 7.5% 4.5%;
  gap: 0;

}

/* Default style for all grid items */
#crossgrid > div {
  font-size: 0.8rem;
  display: flex;
  align-items: center; /* Vertically centers text */
  box-sizing: border-box;
  overflow: hidden;
  font-size: 0.9rem; /* Updated font size */
}

/* Column 1 (Left-Aligned) */
#crossgrid > div:nth-child(5n+1) {

  text-align: right; /* Updated to center */
  margin-left: 15px;
  font-weight: bold;
}

/* Columns 2, 3, 4 (Centered) */
#crossgrid > div:nth-child(5n+2),
#crossgrid > div:nth-child(5n+3),
#crossgrid > div:nth-child(5n+4) {
  justify-content: center; /* Center-align */
  text-align: center;
}

/* Column 5 (Right-Aligned) */
#crossgrid > div:nth-child(5n+5) {
  
  text-align: center; /* Updated to center */
  margin-left: 4px;
  font-weight: bold;
}

#crossgrid > div:nth-child(5n+3) {
  justify-content: center; /* Center-align */
  text-align: center;
  font-weight: bold;
  font-size: 1.3rem;
}

/* Responsive adjustments for small screens */
@media (max-width: 600px) {
  #crossgrid > div {
    font-size: 0.3rem; /* Smaller font size for mobile */
    padding: 0px;
  }

  #crossgrid > div:nth-child(5n+1) {
    margin-left: 7px;
  }

  #crossgrid > div:nth-child(5n+5) {
    margin-left: 2px;
  }
}
@media (max-width: 600px) {
  #crossgrid > div:nth-child(5n+3) {
    font-size: 0.5rem;
  }
}


#parahagrid {
  width: 100%;
  height: 90%;
  background-color: #f0f0f000;
  display: grid;
  grid-template-columns: 21% 20% 21% 19% 19%;
  grid-template-rows: 38% 7.5% 7.5% 7.5% 7.5% 7.5% 7.5% 7.5% 7%;
  gap: 0;
}

/* Default style for all grid items */
#parahagrid > div {
  font-size: 0.8rem;
  display: flex;
  align-items: center; /* Vertically centers text */
  box-sizing: border-box;
  overflow: hidden;
}

/* Column 1 (Left-Aligned) */
#parahagrid > div:nth-child(5n+1) {
  justify-content: flex-start; /* Left-align */
  text-align: left;
  margin-left: 3px;
}

/* Columns 2, 3, 4 (Centered) */
#parahagrid > div:nth-child(5n+2),
#parahagrid > div:nth-child(5n+3),
#parahagrid > div:nth-child(5n+4) {
  justify-content: center; /* Center-align */
  text-align: center;
}

/* Column 5 (Right-Aligned) */
#parahagrid > div:nth-child(5n+5) {
  justify-content: flex-end; /* Right-align */
  text-align: right;
  margin-right: 3px;
}

/* Responsive adjustments for small screens */
@media (max-width: 600px) {
  #parahagrid > div {
    font-size: 0.3rem; /* Smaller font size for mobile */
    padding: 0px;
  }

  #parahagrid > div:nth-child(5n+1) {
    margin-left: 2px;
  }

  #parahagrid > div:nth-child(5n+5) {
    margin-right: 2px;
  }
}

.bottom-label-paraha {
  width: 100%;
  height: 10%;
  background-color: #cccccc00;
  bottom: 0;
  left: 0;
  align-items: center;
  text-align: center;
}


/* Small screen styles */
@media (max-width: 600px) {
  .middle {
    padding: 0;
    margin: 0;
  }

  .middle-box {
    font-size: 0.4rem;
    padding: 0;
    margin: 0;
  }
}




  .right {
    width: 20%;
    background-color: #ffffff00;
  }

  /* Responsive: shrink font and allow scroll if necessary */
  @media (max-width: 600px) {
    .bottom-divs > div {
      font-size: 0.7rem;
    }

    .bottom-divs {
      overflow-x: auto; /* In case it's too tight, allow horizontal scroll */
    }
  }




  #sub-container-2 {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 120px;
  box-sizing: border-box;
}

#inner-sub-a {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: start;
  font-size: 0.7rem;
  padding-top: 3px;
}
#inner-sub-b {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: left;
  justify-content: start;
  font-size: 0.7rem;
  padding-top: 3px;
}


/* Responsive: smaller font and height for small screens */
@media (max-width: 600px) {
  #sub-container-2 {
    height: 62px;
  }
  #inner-sub-a, #inner-sub-b {
    font-size: 0.4rem;
  }
}

/* Registration Info Box Styles */
#left-div-reginfo {
  margin: 8px 0;
  font-size: 0.95em;
  color: #333;
  background: #f7faff;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: Arial, Helvetica, sans-serif;
}
#left-div-reginfo .reg-title {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 4px;
}
#left-div-reginfo .reg-spacer {
  height: 8px;
}

/* Responsive: Registration Info Box */
@media (max-width: 600px) {
  #left-div-reginfo {
    font-size: 0.4em;
    padding: 5px 6px;
  }
  #left-div-reginfo .reg-title {
    font-size: 0.4rem;
    margin-bottom: 2px;
  }
}

#userinfo-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 0.7rem;
  color: #333;
  min-width: 160px;
  padding-left: 36px;
  font-family: Arial, Helvetica, sans-serif;
}

/* Small screen adjustment for userinfo-summary */
@media (max-width: 600px) {
  #userinfo-summary {
    font-size: 0.36rem;
    min-width: 80px;
    padding-left: 12px;
  }
}
     /* Flex row for kuthi panels */
#kuthi-flex-panels {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 24px;
    width: 100%;
}

/* Left panel */
#kuthi-panel-1 {
    /* ...existing code... */
    /* Already has display: flex and column direction */
    /* Ensure it stays left */
    margin-right: 0;
}

/* Right panel */
#kuthi-panel-1 {
    /* ...existing code... */
    /* Already has display: flex and column direction */
    /* Ensure it stays left */
    margin-right: 0;
}

/* Right panel */
#kuthi-panel-2 {
    display: flex 1;
    justify-content: center;
    align-items: flex-start;
    background: #ffffff;
    padding: 0px 0;
    width: 10in;
    height: 13.6in;
    max-width: 100%;
    max-height: 100%;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive: stack panels on small screens */
@media (max-width: 900px) {
    #kuthi-flex-panels {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    #kuthi-panel-1, #kuthi-panel-2 {
        margin: 0;
        width: 100%;
        max-width: 100vw;
    }
}

/* Responsive: maintain 8.5:13.6 aspect ratio for kuthi-panel-2 on small screens */
@media (max-width: 900px) {
    #kuthi-panel-2 {
        width: 100vw;
        height: calc(100vw * (19 / 8.5));
        max-width: 100vw;
        max-height: 130vh;
        box-sizing: border-box;
        padding: 8px 0;
    }
}
@media (max-width: 600px) {
    #kuthi-panel-2 {
        width: 100vw;
        height: calc(100vw * (19 / 8.5));
        max-width: 100vw;
        max-height: 130vh;
        box-sizing: border-box;
        padding: 2px 0;
    }
}



.scrollable-div {
  max-height: 300px; /* or any height you want */
  overflow-y: auto;
}

















#details-popup {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(30,40,60,0.25);
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.modern-popup-card {
  background: #fff;
  border-radius: 18px;
  max-width: 420px;
  width: 92vw;
  margin: auto;
  padding: 0 0 28px 0;
  box-shadow: 0 8px 32px rgba(40,60,120,0.18), 0 1.5px 8px rgba(79,140,255,0.10);
  text-align: left;
  position: relative;
  animation: popupIn 0.32s cubic-bezier(.4,1.6,.6,1) both;
  overflow: hidden;
}
@keyframes popupIn {
  0% { transform: translateY(40px) scale(0.95); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.modern-popup-header {
  background: linear-gradient(90deg, #4f8cff 0%, #38d39f 100%);
  color: #fff;
  padding: 24px 32px 16px 32px;
  border-radius: 18px 18px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.modern-popup-icon {
  font-size: 2rem;
  margin-right: 6px;
}
.modern-popup-header h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.modern-popup-content {
  font-size: 1.08rem;
  color: #222;
  padding: 22px 32px 0 32px;
  line-height: 1.7;
  word-break: break-word;
}
.modern-popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  padding: 24px 32px 0 32px;
}
.modern-btn {
  border: none;
  border-radius: 7px;
  padding: 10px 26px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s;
  box-shadow: 0 2px 8px rgba(79,140,255,0.09);
  outline: none;
}
.modern-btn-ok {
  background: linear-gradient(90deg,#4f8cff 0%,#38d39f 100%);
  color: #fff;
}
.modern-btn-ok:hover {
  background: linear-gradient(90deg,#38d39f 0%,#4f8cff 100%);
  box-shadow: 0 4px 16px rgba(56,211,159,0.13);
}
.modern-btn-cancel {
  background: #fff;
  color: #f44336;
  border: 1.5px solid #f44336;
}
.modern-btn-cancel:hover {
  background: #f44336;
  color: #fff;
}
@media (max-width: 600px) {
  .modern-popup-card, .modern-popup-header, .modern-popup-content, .modern-popup-actions {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .modern-popup-card { max-width: 98vw; }
}

      @media print {
        body * {
          visibility: hidden;
        }
        #kuthi-panel-1, #kuthi-panel-1 * {
          visibility: visible;
        }
        #kuthi-panel-1 {
          position: absolute;
          left: 0;
          top: 0;
        }
    
        @page {
          size: 8.5in 13.6in;
          margin: 0;
        }
      }